package cn.qn.common.configs;

import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.List;

public class IgnorePathConfig {
    public static List<String> IGNORE_PATH = Arrays.asList(
            "/user/login/pwd"
            ,"logout"
    );

    public static String IGNORE_SWAGGER="swagger";

    public static boolean ignoreRequest(HttpServletRequest request){
        String requestUrl = request.getRequestURI();
        return IgnorePathConfig.IGNORE_PATH.contains(requestUrl)
                ||  requestUrl.indexOf(IgnorePathConfig.IGNORE_SWAGGER)!=-1
          ;
    }
}
